package com.gf.user.dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.stereotype.Service;

import com.gf.base.dao.impl.BaseDaoImpl;
import com.gf.user.dao.UserBaseDao;
import com.gf.user.model.User;

@Service("userBaseDao")
public class UserBaseDaoImpl extends BaseDaoImpl implements UserBaseDao {

	@Autowired
	private HibernateTemplate hibernateTemplate;

	@Override
	public void save(User user) {
		hibernateTemplate.save(user);
	}

	@Override
	public List<User> getAllUsers() {
		String sql = "from User";
		return (List<User>) hibernateTemplate.find(sql);
	}

	@Override
	public void test() {
		
	}
}
